home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dirut / cdh50.zip / CDH.TXT < prev    next >
Text File  |  1993-12-23  |  20KB  |  508 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                       CDH
  10.                          Change Directory with History
  11.                                   Version 5.0
  12.  
  13.                                   Dave Kruger
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.                       Copyright (C) 1990-1993 Dave Kruger
  54.  
  55.      2                                                                   2
  56.  
  57.  
  58.      COPYRIGHT STATEMENT
  59.      ===================
  60.  
  61.      CDH Copyright (C) 1990-1993 by Dave Kruger.
  62.      All rights reserved.
  63.  
  64.      CDH is free, but it is a copyrighted work and may be distributed only
  65.      pursuant to this license.
  66.  
  67.      Permission is hereby granted to reproduce and disseminate so long as:
  68.  
  69.      (1)  No remuneration of any kind is received in exchange
  70.  
  71.      (2)  Distribution is without ANY modification to the contents of
  72.           CDH.EXE or the accompanying documentation.
  73.  
  74.      No copy of CDH may be distributed without including a copy of this
  75.      license.
  76.  
  77.      Any other use is prohibited without express, written permission in
  78.      advance.
  79.  
  80.  
  81.      DISCLAIMER
  82.      ==========
  83.  
  84.      The information contained in this document is subject to change
  85.      without notice.  This software and documentation are provided free of
  86.      charge and without warranty of any kind.  No responsibility is
  87.      accepted for errors contained in this documentation, or for
  88.      incidental or consequential damages in connection with the
  89.      furnishing, performance, or use of the software or documentation.
  90.  
  91.  
  92.      TRADEMARKS
  93.      ==========
  94.  
  95.      MS-DOS is a registered trademark of Microsoft Corporation.
  96.  
  97.      Windows is a trademark of Microsoft Corporation.
  98.  
  99.      Lotus and 1-2-3 are registered trademarks of Lotus Development
  100.      Corporation
  101.  
  102.      Turbo C is a registered trademark of Borland International, Inc.
  103.  
  104.      4DOS is a registered trademark of JP Software Inc.
  105.  
  106.      UNIX is a registered trademark of UNIX System Laboratories Inc.
  107.  
  108.      3                                                                   3
  109.  
  110.  
  111.                                     CONTENTS
  112.                                     ========
  113.  
  114.                       Introduction.......................3
  115.                       Installation.......................4
  116.                       Synopsis...........................4
  117.                       Description........................4
  118.                       Options............................5
  119.                       Environment Variables..............6
  120.                       Examples...........................6
  121.                       Enhancing Usability................7
  122.                         4DOS and Aliases.................7
  123.                         Batch Files......................8
  124.                         Environment Variables............8
  125.                       Hardware Requirements..............9
  126.                       Diagnostics........................9
  127.                       Bugs and Enhancements..............9
  128.                       Version and History...............10
  129.  
  130.  
  131.      INTRODUCTION
  132.      ============
  133.  
  134.      This manual documents version 5.0 of the CDH (Change Directory with
  135.      History) utility.
  136.  
  137.      CDH replaces CHDIR, the standard MS-DOS change directory command.
  138.      CDH provides similar functionality to CHDIR, but also includes a
  139.      directory history facility.
  140.  
  141.      CDH maintains a record of the last 23 directories visited in a plain
  142.      text file called the history file.  You can change to a directory in
  143.      the history file by referring to it by its numeric position in the
  144.      file, or by specifying any part of its name that differentiates it
  145.      from other directory names in the history file.
  146.  
  147.      CDH also supports a CDPATH environment variable.  If the wanted
  148.      directory is not a subdirectory of the current directory, the paths
  149.      in the CDPATH are searched to find the wanted directory.
  150.  
  151.      CDH differs functionally from MS-DOS's CHDIR command as follows:
  152.  
  153.      1.   If you invoke CDH without an argument, it changes to the
  154.           directory specified by the HOME environment variable.
  155.  
  156.      2.   Unlike CHDIR, CDH changes directories across drives.  For
  157.           example, if the current directory is C:\TMP, and you enter the
  158.           command CDH D:\TC, CDH changes the current directory to \TC and
  159.           also changes the current drive to D:.  This is equivalent to
  160.           entering the two MS-DOS commands: CD D:\TC and D:.
  161.  
  162.      3.   CDH searches the CDPATH environment variable if the wanted
  163.           directory is not in the current directory.
  164.  
  165.      4                                                                   4
  166.  
  167.  
  168.      INSTALLATION
  169.      ============
  170.  
  171.      The only installation necessary to use CDH is to copy the CDH.EXE
  172.      file to a directory in your PATH.
  173.  
  174.      You can customise the installation by defining environment variables,
  175.      aliases, modifying COMMAND.COM, and so on; these are explained in the
  176.      ENHANCING USABILITY section below.
  177.  
  178.  
  179.      SYNOPSIS
  180.      ========
  181.  
  182.      CDH [<dir>] [-?] [-H] [-L] [-V] [-] [-<pattern>] [-<number>]
  183.  
  184.  
  185.      DESCRIPTION
  186.      ===========
  187.  
  188.      The brackets in the synopsis above indicate that the argument is
  189.      optional, therefore, all arguments are optional.  CDH takes a single
  190.      argument only, or no argument at all.  There are two types of
  191.      arguments: minus (-) options and directory names.  Arguments preceded
  192.      by a "-" cause the current directory to change depending on what
  193.      follows the "-".  Anything else is assumed to be a directory name
  194.      that you want to change to.  Case is not significant for any
  195.      argument; CDH sees no difference between -V and -v.  Similarly, the
  196.      following <pattern>s are treated identically: -SnEg, -SNEG, and -sneG.
  197.  
  198.      If you invoke CDH without any arguments, it changes to the directory
  199.      specified in the HOME environment variable (if set) or to the root
  200.      directory on the current drive.
  201.  
  202.      The last 23 directories visited are recorded, in plain text, in the
  203.      history file.  You can specify the name of the history file with the
  204.      CDHISTFILE environment variable.  If CDHISTFILE is not set (or is set
  205.      to an invalid path), the directory history is written to C:\CDHIST. 
  206.      If you change to a directory that is not in the history file, CDH
  207.      inserts the new directory at position zero in the history file and
  208.      moves all existing directories up by one position.  If the history
  209.      file already contains 23 entries, CDH inserts the new directory at
  210.      position zero in the history file, moves all existing directories up
  211.      by one position, and deletes the oldest directory from the history
  212.      file.
  213.  
  214.      You can edit the history file with any text editor, for example, EDIT
  215.      or EDLIN.  You might want to edit the history file, for example, to
  216.      delete entries for directories that no longer exist, or to delete
  217.      references to directories on floppy drives.  The directory history is
  218.      stored in uppercase in the history file.
  219.  
  220.      5                                                                   5
  221.  
  222.  
  223.      You can access a directory in the history file by referring to its
  224.      numeric position in the file, using -<number> as an argument, for
  225.      example, CDH -15; or you can specify any part of a directory name
  226.      using -<pattern> as an argument, for example, CDH -NEG.  Note,
  227.      however, that <pattern>s must be at least two letters long to avoid
  228.      confusion with other "-" options.
  229.  
  230.      When you invoke CDH with a valid directory name (<dir>) as an
  231.      argument, CDH changes to <dir>.  <dir> can be in the current
  232.      directory or in any directory in the CDPATH.
  233.  
  234.  
  235.      OPTIONS
  236.      =======
  237.  
  238.      <dir>      Changes to directory <dir>.  If <dir> does not exist in
  239.                 the current directory, CDH searches the directories
  240.                 specified in the CDPATH environment variable.  If <dir> is
  241.                 invalid after these searches, CDH prints an error message